#ifndef MAPEXTRACTORDIALOG_H
#define MAPEXTRACTORDIALOG_H

#include <QDialog>

class MapExtractor;

namespace Ui {
class MapExtractorDialog;
}

class MapExtractorDialog : public QDialog
{
    Q_OBJECT
    
public:
    explicit MapExtractorDialog(QWidget *parent = 0);
    ~MapExtractorDialog();
    
public slots:
    void onClickedBtnBrwInputPath();
    void onClickedBtnBrwOutputPath();
    void onClickedBtnBrwImagePath();

    void onExtractStarted(int total);
    void onExtractProgress(int progress);
    void onExtractDetail(const QString &text);
    void onExtractCompleted(bool finished, int errorCode, const QString &errorDesc);

protected:
    void accept();
    void reject();

    void closeEvent(QCloseEvent *event);

    void switchUIState(bool extracting);
    void setTextColor(const QColor &color);

private:
    Ui::MapExtractorDialog *ui;

    MapExtractor    *mExtractor;
    int             mTotal;
};

#endif // MAPEXTRACTORDIALOG_H
